﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Web;
using System.Web.Mvc;
using TestMvcForControllerAndAction.Models;

namespace TestMvcForControllerAndAction.Controllers
{
    public class RemoteDataController :AsyncController
    {
        public async Task<ActionResult> Data()
        {
            string data = await new RemoteService().GetRemoteDataAsync();
            Response.Write(data);
            return View("Result", new Result {ControllerName = "RemoteData", ActionName = "Data"});
        }
    }
}